home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-10-25 | 2.6 KB | 101 lines | [TEXT/MPS ] |
- {Copyright © 1989 by Apple Computer, Inc. All rights reserved.}
-
- UNIT UIconEdit;
-
-
- INTERFACE
-
-
- USES
- { • MacApp }
- UMacApp,
-
- { • Toolbox }
- ToolUtils;
-
-
- CONST kSignature = 'ICED';
- kFileType = 'IDOC';
-
-
- TYPE
- TIconApplication = OBJECT(TApplication)
-
- PROCEDURE TIconApplication.IIconApplication(iconFileType: OSType);
- {Initializes the application and globals.}
-
- FUNCTION TIconApplication.DoMakeDocument(itsCmdNumber: CmdNumber): TDocument; OVERRIDE;
- { Creates a document of type TIconDocument and returns a reference to it.}
-
- END;
-
-
- TIconDocument = OBJECT(TDocument)
-
- fIconBitMap: TIconBitMap; { The document’s icon object. }
-
-
- PROCEDURE TIconDocument.IIconDocument;
- { Initializes the document. }
-
- PROCEDURE TIconDocument.Free; OVERRIDE;
- { Frees allocated memory when the document is closed. }
-
- PROCEDURE TIconDocument.DoInitialState; OVERRIDE;
- { Sets the document's data to represent a "new" document. }
-
- PROCEDURE TIconDocument.DoMakeViews(forPrinting: boolean); OVERRIDE;
- { Creates the windows to display the document's data. }
-
- PROCEDURE TIconDocument.Fields (PROCEDURE DoToField (fieldName: Str255;
- fieldAddr: Ptr;
- fieldType: INTEGER)); OVERRIDE;
-
- END;
-
-
- TIconBitMap = OBJECT(TObject)
-
- fDataHandle: Handle; { Handle to the icon's bit map. }
-
- PROCEDURE TIconBitMap.IIconBitMap;
- { Initialize the IconBitMap object and allocate space for its data. }
-
- PROCEDURE TIconBitMap.Free; OVERRIDE;
- { Free the icon's bit map. }
-
- PROCEDURE TIconBitMap.SetIconBitMap(theBitMap : Handle);
- { Set the contents of the icon bit map to the new bit map. }
-
- PROCEDURE TIconBitMap.Clear;
- { Clear the icon map by setting its bits to zero. }
-
- PROCEDURE TIconBitMap.Invert;
- { Invert the icon's bit map. }
-
- PROCEDURE TIconBitMap.IconBitToWordBit (iconBit: Point; VAR word, bit: INTEGER);
- { Convert icon bit numbers to the corresponding word and bit number. }
-
- FUNCTION TIconBitMap.GetBit(iconBit: Point): BOOLEAN;
- { Return the state of the given bit. }
-
- PROCEDURE TIconBitMap.SetBit(iconBit: Point; turnBitOn: BOOLEAN);
- { Set the state of the given bit as indicated. }
-
- FUNCTION TIconBitMap.Copy: TIconBitMap;
- { Create a new icon object which is a copy of itself. }
-
- PROCEDURE TIconBitMap.CopyDataTo (anIcon: TIconBitMap);
- { Copy icon data to an existing icon object. }
-
- PROCEDURE TIconBitMap.Fields (PROCEDURE DoToField (fieldName: Str255;
- fieldAddr: Ptr;
- fieldType: INTEGER)); OVERRIDE;
- END;
-
-
- IMPLEMENTATION
-
- {$I UIconEdit.inc1.p}
-
- END.